// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';

export const getContractType = type => {
  return postRequest('/typeName/getList', type)
}

export const getContract = params => {
  return postRequest('/projectContract/getList', params)
}

export const updateContract = params => {
  return postRequest('/projectContract/update', params)
}

export const getFacilitatorContract = params => {
  return postRequest('/facilitatorContract/getList', params)
}

export const getPartA = () => {
  return postRequest('/customerCompany/getAll')
}

export const getBankAccount = params => {
  return postRequest('/bankAccount/getAccount', params)
}

export const getPartB = () => {
  return postRequest('/company')
}

export const insertContract = params => {
  return postRequest('/projectContract/insert', params)
}

export const getPartAInfo = params => {
  return postRequest('/customerCompany/getOne', params)
}

export const getPartBInfo = () => {
  return postRequest('/company')
}

export const getAccount = params => {
  return postRequest('/bankAccount/getOne', params)
}

export const getProject = () => {
  return postRequest('/projectContract/getName')
}

export const getFacilitator = () => {
  return postRequest('/facilitator/getName')
}

export const insertFacilitatorContract = params => {
  return postRequest('/facilitatorContract/insert', params)
}

export const updateFacilitatorContract = params => {
  return postRequest('/facilitatorContract/update', params)
}

export const getFacilitatorContractByID = params => {
  return postRequest('/facilitatorContract/getOne', params)
}

export const getProjectContractByID = params => {
  return postRequest('/projectContract/getOne', params)
}

export const getDivisionContract = params => {
  return postRequest('/projectContract/getDivisionList', params)
}

export const getOrganization = () => {
  return postRequest('/organization/getDivision')
}

export const getAllOrganization = () => {
  return getRequest('/organization/all')
}

export const getIncome = params => {
  return postRequest('/projectContractIncome/getByContractId', params)
}

export const getDivisionBudget = params => {
  return postRequest('/projectBudget/getDivisionList', params)
}

export const getDivisionContractSum = () => {
  return postRequest('/projectContract/getDivisionSum')
}

export const destroyIncome = params => {
  return postRequest('/projectContractIncome/destroy', params)
}

export const getBankInfo = params => {
  return postRequest('/projectContractIncome/getBankByContractId', params)
}

export const insertIncome = params => {
  return postRequest('/projectContractIncome/insert', params)
}

export const getHeadquartersContract = (params) => {
  return postRequest('/projectContract/getHeadquartersList', params)
}

export const getHeadquartersContractSum = () => {
  return postRequest('/projectContract/getHeadquartersSum')
}

export const getInvoiceApply = params => {
  return postRequest('/invoiceApply/getList', params)
}

export const getInvoiceAllApply = params => {
  return postRequest('/invoiceApply/getAllList', params)
}

export const getSupplierContract = params => {
  return postRequest('/supplierContract/getList', params)
}

export const getSupplierName = params => {
  return postRequest('/supplier/getNameByType', params)
}

export const insertSupplierContract = params => {
  return postRequest('/supplierContract/insert', params)
}

export const getSupplierContractById = params => {
  return postRequest('/supplierContract/getOne', params)
}

export const updateSupplierContract = params => {
  return postRequest('/supplierContract/update', params)
}

export const updateSupplierContractDetail = params => {
  return postRequest('/supplierContractDetail/update', params)
}

export const insertSupplierContracrtDetail = params => {
  return postRequest('/supplierContractDetail/insert', params)
}

export const getSupplierContracrtDetail = params => {
  return postRequest('/supplierContractDetail/getAll', params)
}

export const deleteSupplierContracrtDetail = params => {
  return postRequest('/supplierContractDetail/destroy', params)
}

export const updateSupplierContracrtDetail = params => {
  return postRequest('/supplierContractDetail/update', params)
}

export const updateSupplierContracrtDetailById = params => {
  return postRequest('/supplierContractDetail/updateByContractId', params)
}

export const getAllSupplierContract = params => {
  return postRequest('/supplierContract/getAllList', params)
}

export const getSupplierContractDetail = params => {
  return postRequest('/supplierContractDetail/getSumList', params)
}

export const getAllSupplierContractDetail = params => {
  return postRequest('/supplierContractDetail/getAllSumList', params)
}

export const getSumBySupplier = () => {
  return postRequest('/supplierContractDetail/getSumBySupplier')
}

export const getTotalBySupplier = () => {
  return postRequest('/supplierContractDetail/getTotalBySupplier')
}

export const getTotalByOrganization = () => {
  return postRequest('/supplierContractDetail/getSumByOrganization')
}